package cn.wolfcode.crm.util;

import cn.wolfcode.crm.domain.Employee;
import org.apache.shiro.SecurityUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * 通过shiro获取当前登录用户
 */
public abstract class UserContext {
  public static Employee getCurrentUser(){
      return (Employee) SecurityUtils.getSubject().getPrincipal();
  }

}

